package com.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;

import com.dao.Users;
import com.pojo.Userspojo;
import com.util.MySqlSessionFactory;

public class UsersService {
	SqlSession sql = MySqlSessionFactory.getSqlSession();
	Users dao = sql.getMapper(Users.class);

	public Userspojo queryone(String account, String password) {
		dao.queryone(account, password);
		sql.commit();
		return dao.queryone(account, password);
	}

	public Userspojo queryUsers(String id) {
		dao.queryUsers(id);
		sql.commit();
		return dao.queryUsers(id);
	}

	public List<Map> tongji() {
		return dao.tongji();
	}

	public List<Map> querytime(String begin, String end) {
		return dao.querytime(begin, end);
	}
}
